/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.seari.service;

import com.seari.bean.MenuPrivilege;
import com.seari.bean.Role;
import com.seari.bean.RolePrivilege;
import com.seari.pojo.QueryRole;

import java.util.List;

/**
 *
 * @author Rainbow
 */
public interface RoleService
{
    public List<Role> getRoleByParams(QueryRole qur);
    // 根据urid查询角色
    public List<Role> getUserRoleByUrid(int urid);
    public int getRoleCount();
    public int checkRoleExist(QueryRole qur);
    public int addRole(Role role, RolePrivilege rolePrivilege);
    public int updateRole(Role role,RolePrivilege rolePrivilege);
    public int deleteRole(int urid);
    // 根据URID查询角色以及权限
	public List<Role> getRoleByUrid(QueryRole qur);
	
	public List<Role> roleSearch(QueryRole qur);
	// 根据角色ID查询拥有的菜单页面
	public List<MenuPrivilege> getMenuByUrids(List<Integer> roleIds);
	
	public Integer roleSearchCount(QueryRole qur);
	
}
